package com.sbox.album.model;

import android.app.Activity;
import android.content.Context;
import android.view.WindowManager;

public class AlbumContext {
	private static Context mContext = null;
	private static Activity mActivity = null;
	private static AlbumManager mAlbumManager = null;
	private static AlbumInfo mAlbum = null;
	private static PictureInfo mPicture = null;
	private static int mPicIndex = -1;
	private static int mDisplayWidth = 0;
	private static int mDisplayHeight = 0;
	
	public static void init(Context c) {
		mContext = c;
		WindowManager wm = (WindowManager)c.getSystemService(Context.WINDOW_SERVICE);
		mDisplayWidth = wm.getDefaultDisplay().getWidth();
		mDisplayHeight = wm.getDefaultDisplay().getHeight();
	}
	
	public static Context getContext() {
		return mContext;
	}
	
	public static Activity getActivity() {
		return mActivity;
	}
	
	public void setActivity(Activity act) {
		mActivity = act;
	}
	
	public static AlbumManager getAlbumManager() {
		return AlbumManager.getInstance();
	}
	
	public static ThumbManager getAlbumCache() {
		return ThumbManager.getInstance();
	}
	
	public static CacheManager getCacheManager() {
		return CacheManager.getInstance();
	}
	
	public static AlbumInfo getAlbum() {
		return mAlbum;
	}
	
	public static void setAlbum(AlbumInfo album) {
		mAlbum = album;
	}
	
	public static PictureInfo getPicture() {
		return mPicture;
	}
	
	public static void setPicture(PictureInfo pic) {
		mPicture = pic;
	}
	
	public static int getPicIndex() {
		return mPicIndex;
	}
	
	public static void setPicIndex(int index) {
		mPicIndex = index;
	}
	
	public static int getDisplayWidth() {
		return mDisplayWidth;
	}
	
	public static int getDisplayHeight() {
		return mDisplayHeight;
	}
}
